package weixin.core.controller;

import com.github.sd4324530.fastweixin.api.MaterialAPI;
import com.github.sd4324530.fastweixin.api.response.UploadMaterialResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.io.File;

/**
 * Created by lxb on 2016/5/17.
 */
@Controller
@RequestMapping("materia")
public class MateriaController {
    @Autowired
    private MaterialAPI materialAPI;
    @RequestMapping("uploadFile")
    @ResponseBody
    public UploadMaterialResponse uploadFile(){
        return materialAPI.uploadMaterialFile(new File("C:\\Users\\lxb\\Desktop\\一休哥 - 铃声.wav"),
                "一休哥","哥几个几个几");
    }
}
